using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._ProjectionsandTransformations._Raster
{
    /// <summary>
    /// <para>Project Raster</para>
    /// <para>Transforms a raster dataset from one coordinate system to another.</para>
    /// <para>将栅格数据集从一个坐标系转换为另一个坐标系。</para>
    /// </summary>    
    [DisplayName("Project Raster")]
    public class ProjectRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ProjectRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The raster dataset that will be transformed into a new projection.</para>
        /// <para>将转换为新投影的栅格数据集。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster Dataset</para>
        /// <para><xdoc>
        ///   <para>The raster dataset with the new projection that will be created.</para>
        ///   <para>When storing the raster dataset in a file format, you need to specify the file extension:</para>
        ///   <bulletList>
        ///     <bullet_item>.bil—Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip—Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS IMAGINE</bullet_item><para/>
        ///     <bullet_item>.jpg—JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2—JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf—MRF</bullet_item><para/>
        ///     <bullet_item>.crf—CRF</bullet_item><para/>
        ///     <bullet_item>No extension for Esri Grid</bullet_item><para/>
        ///   </bulletList>
        ///   <para>When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset.</para>
        ///   <para>When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a Compression Type and Compression Quality in the geoprocessing Environments.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含将要创建的新投影的栅格数据集。</para>
        ///   <para>以文件格式存储栅格数据集时，需要指定文件扩展名：</para>
        ///   <bulletList>
        ///     <bullet_item>.bil - Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip - Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS 想象</bullet_item><para/>
        ///     <bullet_item>.jpg - JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2 - JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf - MRF</bullet_item><para/>
        ///     <bullet_item>.crf - CRF</bullet_item><para/>
        ///     <bullet_item>没有 Esri Grid 的扩展模块</bullet_item><para/>
        ///   </bulletList>
        ///   <para>在地理数据库中存储栅格数据集时，不应在栅格数据集的名称中添加文件扩展名。</para>
        ///   <para>将栅格数据集存储为 JPEG 文件、JPEG 2000 文件、TIFF 文件或地理数据库时，可以在地理处理环境中指定压缩类型和压缩质量。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_coor_system">
        /// <para>Output Coordinate System</para>
        /// <para>The coordinate system of the new raster dataset.</para>
        /// <para>新栅格数据集的坐标系。</para>
        /// </param>
        public ProjectRaster(object _in_raster, object _out_raster, object _out_coor_system)
        {
            this._in_raster = _in_raster;
            this._out_raster = _out_raster;
            this._out_coor_system = _out_coor_system;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Project Raster";

        public override string CallName => "management.ProjectRaster";

        public override List<string> AcceptEnvironments => ["cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "nodata", "outputCoordinateSystem", "parallelProcessingFactor", "pyramid", "rasterStatistics", "resamplingMethod", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_raster, _out_coor_system, _resampling_type.GetGPValue(), _cell_size, _geographic_transform, _Registration_Point, _in_coor_system, _vertical.GetGPValue()];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The raster dataset that will be transformed into a new projection.</para>
        /// <para>将转换为新投影的栅格数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output Raster Dataset</para>
        /// <para><xdoc>
        ///   <para>The raster dataset with the new projection that will be created.</para>
        ///   <para>When storing the raster dataset in a file format, you need to specify the file extension:</para>
        ///   <bulletList>
        ///     <bullet_item>.bil—Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip—Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS IMAGINE</bullet_item><para/>
        ///     <bullet_item>.jpg—JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2—JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf—MRF</bullet_item><para/>
        ///     <bullet_item>.crf—CRF</bullet_item><para/>
        ///     <bullet_item>No extension for Esri Grid</bullet_item><para/>
        ///   </bulletList>
        ///   <para>When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset.</para>
        ///   <para>When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a Compression Type and Compression Quality in the geoprocessing Environments.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含将要创建的新投影的栅格数据集。</para>
        ///   <para>以文件格式存储栅格数据集时，需要指定文件扩展名：</para>
        ///   <bulletList>
        ///     <bullet_item>.bil - Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip - Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS 想象</bullet_item><para/>
        ///     <bullet_item>.jpg - JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2 - JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf - MRF</bullet_item><para/>
        ///     <bullet_item>.crf - CRF</bullet_item><para/>
        ///     <bullet_item>没有 Esri Grid 的扩展模块</bullet_item><para/>
        ///   </bulletList>
        ///   <para>在地理数据库中存储栅格数据集时，不应在栅格数据集的名称中添加文件扩展名。</para>
        ///   <para>将栅格数据集存储为 JPEG 文件、JPEG 2000 文件、TIFF 文件或地理数据库时，可以在地理处理环境中指定压缩类型和压缩质量。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Output Coordinate System</para>
        /// <para>The coordinate system of the new raster dataset.</para>
        /// <para>新栅格数据集的坐标系。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_coor_system { get; set; }


        /// <summary>
        /// <para>Resampling Technique</para>
        /// <para><xdoc>
        ///   <para>The resampling algorithm to be used. The default is Nearest.</para>
        ///   <bulletList>
        ///     <bullet_item>Nearest neighbor— Nearest neighbor is the fastest resampling method; it minimizes changes to pixel values since no new values are created. It is suitable for discrete data, such as land cover.</bullet_item><para/>
        ///     <bullet_item>Bilinear interpolation— Bilinear interpolation calculates the value of each pixel by averaging (weighted for distance) the values of the surrounding four pixels. It is suitable for continuous data.</bullet_item><para/>
        ///     <bullet_item>Cubic convolution— Cubic convolution calculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. This produces the smoothest image but can create values outside of the range found in the source data. It is suitable for continuous data.</bullet_item><para/>
        ///     <bullet_item>Majority resampling—Majority resampling determines the value of each pixel based on the most popular value in a 3 by 3 window. Suitable for discrete data.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The Nearest and Majority options are used for categorical data, such as a land-use classification. The Nearest option is the default since it is the quickest and also because it will not change the cell values. Do not use either of these for continuous data, such as elevation surfaces.</para>
        ///   <para>The Bilinear option and the Cubic option are most appropriate for continuous data. It is recommended that neither of these be used with categorical data because the cell values may be altered.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用的重采样算法。默认值为“最近”。</para>
        ///   <bulletList>
        ///     <bullet_item>最近邻 - 最近邻是最快的重采样方法;它最大限度地减少了对像素值的更改，因为不会创建新值。它适用于离散数据，例如土地覆盖。</bullet_item><para/>
        ///     <bullet_item>双线性插值 — 双线性插值通过对周围四个像素的值进行平均（按距离加权）来计算每个像素的值。它适用于连续数据。</bullet_item><para/>
        ///     <bullet_item>三次卷积— 三次卷积通过基于周围 16 个像素拟合平滑曲线来计算每个像素的值。这将生成最平滑的图像，但可能会创建源数据中查找范围之外的值。它适用于连续数据。</bullet_item><para/>
        ///     <bullet_item>多数重采样 - 多数重采样根据 3 x 3 窗口中最常用的值确定每个像素的值。适用于离散数据。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>“最近”和“多数”选项用于分类数据，例如土地利用分类。“最近”选项是默认选项，因为它是最快的选项，并且因为它不会更改单元格值。请勿将其中任何一个用于连续数据，例如高程表面。</para>
        ///   <para>“双线性”选项和“立方”选项最适合连续数据。建议将这两者都不用于分类数据，因为单元格值可能会更改。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Resampling Technique")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _resampling_type_value _resampling_type { get; set; } = _resampling_type_value._NEAREST;

        public enum _resampling_type_value
        {
            /// <summary>
            /// <para>Nearest neighbor</para>
            /// <para>Nearest neighbor— Nearest neighbor is the fastest resampling method; it minimizes changes to pixel values since no new values are created. It is suitable for discrete data, such as land cover.</para>
            /// <para>最近邻 - 最近邻是最快的重采样方法;它最大限度地减少了对像素值的更改，因为不会创建新值。它适用于离散数据，例如土地覆盖。</para>
            /// </summary>
            [Description("Nearest neighbor")]
            [GPEnumValue("NEAREST")]
            _NEAREST,

            /// <summary>
            /// <para>Bilinear interpolation</para>
            /// <para>Bilinear interpolation— Bilinear interpolation calculates the value of each pixel by averaging (weighted for distance) the values of the surrounding four pixels. It is suitable for continuous data.</para>
            /// <para>双线性插值 — 双线性插值通过对周围四个像素的值进行平均（按距离加权）来计算每个像素的值。它适用于连续数据。</para>
            /// </summary>
            [Description("Bilinear interpolation")]
            [GPEnumValue("BILINEAR")]
            _BILINEAR,

            /// <summary>
            /// <para>Cubic convolution</para>
            /// <para>Cubic convolution— Cubic convolution calculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. This produces the smoothest image but can create values outside of the range found in the source data. It is suitable for continuous data.</para>
            /// <para>三次卷积— 三次卷积通过基于周围 16 个像素拟合平滑曲线来计算每个像素的值。这将生成最平滑的图像，但可能会创建源数据中查找范围之外的值。它适用于连续数据。</para>
            /// </summary>
            [Description("Cubic convolution")]
            [GPEnumValue("CUBIC")]
            _CUBIC,

            /// <summary>
            /// <para>Majority resampling</para>
            /// <para>Majority resampling—Majority resampling determines the value of each pixel based on the most popular value in a 3 by 3 window. Suitable for discrete data.</para>
            /// <para>多数重采样 - 多数重采样根据 3 x 3 窗口中最常用的值确定每个像素的值。适用于离散数据。</para>
            /// </summary>
            [Description("Majority resampling")]
            [GPEnumValue("MAJORITY")]
            _MAJORITY,

        }

        /// <summary>
        /// <para>Output Cell Size</para>
        /// <para>The cell size of the new raster using an existing raster dataset or by specifying its width (x) and height (y).</para>
        /// <para>使用现有栅格数据集或通过指定新栅格的宽度 （x） 和高度 （y） 来计算新栅格的像元大小。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Cell Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Geographic Transformation</para>
        /// <para>The geographic transformation when projecting from one geographic system or datum to another. A transformation is required when the input and output coordinate systems have different datums.</para>
        /// <para>从一个地理系统或基准投影到另一个地理系统或基准面时的地理变换。当输入坐标系和输出坐标系具有不同的基准面时，需要进行变换。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geographic Transformation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _geographic_transform { get; set; } = null;


        /// <summary>
        /// <para>Registration Point</para>
        /// <para><xdoc>
        ///   <para>The lower left point for anchoring the output cells. This point does not have to be a corner coordinate or fall within the raster dataset.</para>
        ///   <para>The Snap Raster Environment setting will take priority over the Registration Point parameter. To set the registration point, make sure Snap Raster is not set.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于锚定输出单元的左下点。此点不必是拐角坐标，也不必位于栅格数据集内。</para>
        ///   <para>捕捉栅格环境设置将优先于配准点参数。要设置配准点，请确保未设置捕捉栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Registration Point")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Registration_Point { get; set; } = null;


        /// <summary>
        /// <para>Input Coordinate System</para>
        /// <para>The coordinate system of the input raster dataset.</para>
        /// <para>输入栅格数据集的坐标系。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_coor_system { get; set; } = null;


        /// <summary>
        /// <para>Vertical</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a vertical transformation will be applied.</para>
        ///   <para>This option is active when the input and output coordinate systems have a vertical coordinate system and the input raster's coordinates have z-values.</para>
        ///   <para>When Vertical is checked, the Geographic Transformation parameter can include ellipsoidal transformations and transformations between vertical datums. For example, ~NAD_1983_To_NAVD88_CONUS_GEOID12B_Height + NAD_1983_To_WGS_1984_1 transforms geometry vertices that are defined on NAD 1983 datum with NAVD 1988 heights into vertices on the WGS 1984 ellipsoid (with z-values representing ellipsoidal heights). The tilde (~) indicates reversed direction of transformation.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Unchecked—No vertical transformation is applied. The z-values of geometry coordinates will be ignored and the z-values will not be modified. This is the default.</bullet_item><para/>
        ///       <bullet_item>Checked—The transformation specified in the Geographic Transformation parameter is applied. The Project Raster tool transforms x-, y-, and z-values of geometry coordinates.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        ///   <para>Many vertical transformations require additional data files that must be installed using the ArcGIS Coordinate Systems Data installation package.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否应用垂直转换。</para>
        ///   <para>当输入坐标系和输出坐标系具有垂直坐标系且输入栅格坐标具有 z 值时，此选项处于活动状态。</para>
        ///   <para>选中“垂直”（Vertical） 后，地理变换参数可以包括椭球体变换和垂直基准面之间的变换。例如，~NAD_1983_To_NAVD88_CONUS_GEOID12B_Height + NAD_1983_To_WGS_1984_1 将高度为 NAVD 1988 的 NAD 1983 基准面上定义的几何顶点转换为 WGS 1984 椭球体上的顶点（z 值表示椭球体高度）。波浪号 （~） 表示转换方向相反。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>未选中 - 不应用垂直变换。几何坐标的 z 值将被忽略，并且不会修改 z 值。这是默认设置。</bullet_item><para/>
        ///       <bullet_item>选中 - 应用地理变换参数中指定的变换。投影栅格工具可变换几何坐标的 x、y 和 z 值。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        ///   <para>许多垂直变换需要额外的数据文件，这些文件必须使用 ArcGIS 坐标系数据安装包进行安装。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Vertical")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _vertical_value _vertical { get; set; } = _vertical_value._false;

        public enum _vertical_value
        {
            /// <summary>
            /// <para>VERTICAL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("VERTICAL")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_VERTICAL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_VERTICAL")]
            [GPEnumValue("false")]
            _false,

        }

        public ProjectRaster SetEnv(object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object nodata = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object pyramid = null, object rasterStatistics = null, object resamplingMethod = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, nodata: nodata, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, pyramid: pyramid, rasterStatistics: rasterStatistics, resamplingMethod: resamplingMethod, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}